package com.yuanqi.dz.dc.service.impl;

import java.text.SimpleDateFormat;



public class Test {
	public static void main(String[] args) {
		testTime();
	}
    
	public static  void  testTime(){
		/*String trantime = "2017-07-12 12:12:12";
		String d= trantime.replaceAll("-", "").replaceAll(":", "").replaceAll("\\s*", "");
		System.out.println(d);*/
	    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM");  
       // System.out.println(  new DateUtil(sdf.parse("2015-02")));  
	}

	/*public static void getFtpFile(){
		String dz_date_format = "yyMMdd";
		String dzDate = "20170302";
		String fileName = "aeyk_TL_IND{date}01ACOMA.txt";
		String local_path = "D:/ftp/";
		String address = "192.168.0.166";
		int ftp_port=21;
		String username = "yuanqi";
		String password = "123456";
		String remotePath="/";

		SimpleDateFormat sdf = new SimpleDateFormat(dz_date_format);
		Calendar calendar = Calendar.getInstance();
		if (StringHelper.isEmpty(dzDate)) {
			calendar.add(Calendar.DAY_OF_MONTH, Integer.valueOf("-1".toString()));
		} else {
			calendar.setTime(PowerDateFormat.getInstance(DateUtil.YYYYMMDD).parse(dzDate));
		}
		String filename = "aeyk_TL_IND17031701ACOMA";//;fileName.replace("{merchant}", "").replace("{date}", sdf.format(calendar.getTime()));
		File file=new File(local_path, filename);
		System.out.println("连接ftp取数据:{ftp_ip:"+address+",ftp_port:"+ftp_port+",ftp_remotepath:"+remotePath+",filename:"+file.getName()+"}");
		System.out.println("FTP账号信息:{username:"+username+",pwd:"+password+"}");
		boolean download = false;
		try {
			boolean flag =new FtpUtil(address,ftp_port,username,password,remotePath).downFile(file);
		} catch (Exception e) {
			e.printStackTrace();
		}

	}*/
}
